<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2019/8/9
  Time: 8:42
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
    <script src="<c:url value='js/jquery-1.8.2.js'/>"></script>
</head>
<body>
    <center>
        <h1>商品列表</h1>
        <p align="right">欢迎您${rub.truename}</p>
        <table border="1" rules="all">
            <tr align="center" bgcolor="#00ffff">
                <td>
                    商品编号
                </td>
                <td>
                    商品名称
                </td>
                <td>
                    商品价格
                </td>
                <td>
                    生产日期
                </td>
                <td>
                    商品库存
                </td>
                <td colspan="33">
                    操作
                </td>
            </tr>
            <c:forEach var="p" items="${plist}">
                <tr align="center" bgcolor="#ff8c00">
                    <td>
                       ${p.pid}
                    </td>
                    <td>
                       ${p.name}
                    </td>
                    <td>
                        ${p.price}
                    </td>
                    <td>
                        ${p.sdate}
                    </td>
                    <td>
                            ${p.stock}
                    </td>
                    <td>
                        <a href="<c:url value='/toBuyPro.do?pid=${p.pid}'/>"><button>购买</button></a>
                    </td>
                </tr>
            </c:forEach>
        </table>
    </center>
</body>
</html>
